package BitCreekLib;

import java.io.Serializable;

/**
 * @author Ivan Litsvinenka & Emanuele Ricci
 *         Classe che rappresenta la coppai di porte TCP e UDP relative a un torrent sul Tracker
 */
public class Ports implements ITorrentPorts, Serializable {

    /**
     * Porta TCP
     */
    private int tcpPort;

    /**
     * Porta UDP
     */
    private int udpPort;

    /**
     * Costruttore di TorrentPorts
     * @param tcpPort
     * @param udpPort
     */
    public Ports( int tcpPort, int udpPort ) {
        setTcpPort ( tcpPort );
        setUdpPort ( udpPort );
    }

    public int getTcpPort () {
        return tcpPort;
    }

    public void setTcpPort ( int tcpPort ) {
        this.tcpPort = tcpPort;
    }

    public int getUdpPort () {
        return udpPort;
    }

    public void setUdpPort ( int udpPort ) {
        this.udpPort = udpPort;
    }

    public String toString () {
        return " TCPTracker: " + this.getTcpPort () + " UDPTracker: " + this.getUdpPort();
	}
}
